package top.huxy.boot.model.dto;

import lombok.Data;
import top.huxy.boot.exception.RequestParamIllegalException;
import top.huxy.boot.util.StringUtils;

/**
 * @Classname DTOComment
 * @Description DTOComment
 * @Date 2021/9/3 10:41
 * @Created by huxy
 */
@Data
public class DTOComment {
    /**
     * 评论的博客id
     */
    private Integer id;
    /**
     * 评论内容
     */
    private String content;

    public void test() {
        String temp;
        if ((temp = StringUtils.getEmptyParamName("id,content", id, content)) != null) {
            throw new RequestParamIllegalException("param [" + temp + "] is required !");
        }
    }
}
